/*    */ package com.newcrm.webapi.sub;
/*    */ 
/*    */ import com.newcrm.exception.NotFoundException;
/*    */ import com.newcrm.thread.LuceneThread;
/*    */ import com.newcrm.webapi.AbstractAction;
/*    */ import com.newcrm.webapi.AbstractHttpServlet;
/*    */ import java.io.IOException;
/*    */ import java.io.PrintWriter;
/*    */ import javax.servlet.ServletException;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ import net.sf.json.JSONObject;
/*    */ 
/*    */ public class RebuildLuceneIndex extends AbstractAction
/*    */ {
/* 19 */   private String indexPath = null;
/*    */ 
/*    */   public RebuildLuceneIndex(AbstractHttpServlet servlet, String indexPath) {
/* 22 */     super(servlet);
/* 23 */     this.indexPath = indexPath;
/*    */   }
/*    */ 
/*    */   public void parse(HttpServletRequest request, HttpServletResponse response)
/*    */     throws IOException, ServletException, NotFoundException
/*    */   {
/* 30 */     new LuceneThread(this.indexPath, true).start();
/*    */ 
/* 32 */     response.setContentType("text/html;charset=utf-8");
/* 33 */     PrintWriter out = response.getWriter();
/* 34 */     JSONObject jsonObject = new JSONObject();
/*    */ 
/* 36 */     jsonObject.put("error", "0");
/* 37 */     out.println(jsonObject);
/* 38 */     out.flush();
/* 39 */     out.close();
/*    */   }
/*    */ }

/* Location:           C:\E\referenceProject\CRM参考\qikebao\WEB-INF\lib\qikebao.jar
 * Qualified Name:     com.newcrm.webapi.sub.RebuildLuceneIndex
 * JD-Core Version:    0.6.1
 */